const tableContainer = document.getElementById('multiplicationTable');
let tableHtml = '';

for (let i = 1; i <= 9; i++) {
    for (let j = 1; j <= i; j++) {
        const product = i * j;
        // 从第二行开始，大数字在前（即 i × j 格式）
        tableHtml += `<div class="cell">${i} × ${j} = ${product}</div>`;
    }
    tableHtml += '<br>';
}

tableContainer.innerHTML = tableHtml;